package com.probiz.estore.common.model.system.base;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import com.probiz.estore.common.model.system.SystemConfig;

/**
 * SystemConfig Base Java Bean, base class for the model, mapped directly to database table
 * 
 * Avoid changing this file if not necessary, will be overwritten. 
 *
 */
public class SystemConfigTbl extends com.probiz.estore.core.model.BaseObject implements Serializable {

	private static final long	serialVersionUID	= -1221314403742639855L;
	
	protected Integer configId;
	protected String configKey;
	protected Short configType;
	protected String configValue;
	protected Short dataType;
	protected Short isSystem;
	protected Integer createBy;
	protected Integer updateBy;
	protected java.util.Date createTime;
	protected java.util.Date updateTime;
	protected Integer version;
	protected String team;
	


	/**
	 * Default Empty Constructor for class SystemConfig
	 */
	public SystemConfigTbl () {
		super();
	}
	
	/**
	 * Default Key Fields Constructor for class SystemConfig
	 */
	public SystemConfigTbl (
		 Integer in_configId
        ) {
		this.setConfigId(in_configId);
    }

    

	/**
	 * 
	 * @return Integer
     * @hibernate.id column="configId" type="java.lang.Integer" generator-class="native"
	 */
	public Integer getConfigId() {
		return this.configId;
	}
	
	/**
	 * Set the configId
	 */	
	public void setConfigId(Integer aValue) {
		this.configId = aValue;
	}	

	/**
	 * 
	 * @return String
	 * @hibernate.property column="configKey" type="java.lang.String" length="64" not-null="true" unique="false"
	 */
	public String getConfigKey() {
		return this.configKey;
	}
	
	/**
	 * Set the configKey
	 * @spring.validator type="required"
	 */	
	public void setConfigKey(String aValue) {
		this.configKey = aValue;
	}	

	/**
	 * 
	 * @return Short
	 * @hibernate.property column="configType" type="java.lang.Short" length="6" not-null="false" unique="false"
	 */
	public Short getConfigType() {
		return this.configType;
	}
	
	/**
	 * Set the configType
	 */	
	public void setConfigType(Short aValue) {
		this.configType = aValue;
	}	

	/**
	 * 
	 * @return String
	 * @hibernate.property column="configValue" type="java.lang.String" length="1024" not-null="true" unique="false"
	 */
	public String getConfigValue() {
		return this.configValue;
	}
	
	/**
	 * Set the configValue
	 * @spring.validator type="required"
	 */	
	public void setConfigValue(String aValue) {
		this.configValue = aValue;
	}	

	/**
	 * 
	 * @return Short
	 * @hibernate.property column="dataType" type="java.lang.Short" length="6" not-null="false" unique="false"
	 */
	public Short getDataType() {
		return this.dataType;
	}
	
	/**
	 * Set the dataType
	 */	
	public void setDataType(Short aValue) {
		this.dataType = aValue;
	}
	/**
	 * 
	 * @return Short
	 * @hibernate.property column="isSystem" type="java.lang.Short" length="6" not-null="false" unique="fase"
	 */
	public Short getIsSystem() {
		return isSystem;
	}
	/**
	 * 
	 * set the isSystem
	 */
	public void setIsSystem(Short isSystem) {
		this.isSystem = isSystem;
	}

	/**
	 * 
	 * @return Integer
	 * @hibernate.property column="createBy" type="java.lang.Integer" length="11" not-null="false" unique="false"
	 */
	public Integer getCreateBy() {
		return this.createBy;
	}
	
	/**
	 * Set the createBy
	 */	
	public void setCreateBy(Integer aValue) {
		this.createBy = aValue;
	}	

	/**
	 * 
	 * @return Integer
	 * @hibernate.property column="updateBy" type="java.lang.Integer" length="11" not-null="false" unique="false"
	 */
	public Integer getUpdateBy() {
		return this.updateBy;
	}
	
	/**
	 * Set the updateBy
	 */	
	public void setUpdateBy(Integer aValue) {
		this.updateBy = aValue;
	}	

	/**
	 * 
	 * @return java.util.Date
	 * @hibernate.property column="createTime" type="java.util.Date" length="19" not-null="false" unique="false"
	 */
	public java.util.Date getCreateTime() {
		return this.createTime;
	}
	
	/**
	 * Set the createTime
	 */	
	public void setCreateTime(java.util.Date aValue) {
		this.createTime = aValue;
	}	

	/**
	 * 
	 * @return java.util.Date
	 * @hibernate.property column="updateTime" type="java.util.Date" length="19" not-null="false" unique="false"
	 */
	public java.util.Date getUpdateTime() {
		return this.updateTime;
	}
	
	/**
	 * Set the updateTime
	 */	
	public void setUpdateTime(java.util.Date aValue) {
		this.updateTime = aValue;
	}	

	/**
	 * 
	 * @return Integer
	 * @hibernate.property column="version" type="java.lang.Integer" length="11" not-null="true" unique="false"
	 */
	public Integer getVersion() {
		return this.version;
	}
	
	/**
	 * Set the version
	 * @spring.validator type="required"
	 */	
	public void setVersion(Integer aValue) {
		this.version = aValue;
	}	

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof SystemConfig)) {
			return false;
		}
		SystemConfig rhs = (SystemConfig) object;
		return new EqualsBuilder()
				.append(this.configId, rhs.configId)
				.append(this.configKey, rhs.configKey)
				.append(this.configType, rhs.configType)
				.append(this.configValue, rhs.configValue)
				.append(this.dataType, rhs.dataType)
				.append(this.isSystem,rhs.isSystem)
				.append(this.createBy, rhs.createBy)
				.append(this.updateBy, rhs.updateBy)
				.append(this.createTime, rhs.createTime)
				.append(this.updateTime, rhs.updateTime)
				.append(this.version, rhs.version)
				.isEquals();
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-82280557, -700257973)
				.append(this.configId) 
				.append(this.configKey) 
				.append(this.configType) 
				.append(this.configValue) 
				.append(this.dataType)
				.append(this.isSystem)
				.append(this.createBy) 
				.append(this.updateBy) 
				.append(this.createTime) 
				.append(this.updateTime) 
				.append(this.version) 
				.toHashCode();
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this)
				.append("configId", this.configId) 
				.append("configKey", this.configKey) 
				.append("configType", this.configType) 
				.append("configValue", this.configValue) 
				.append("dataType", this.dataType)
				.append("isSystem",this.isSystem)
				.append("createBy", this.createBy) 
				.append("updateBy", this.updateBy) 
				.append("createTime", this.createTime) 
				.append("updateTime", this.updateTime) 
				.append("version", this.version) 
				.toString();
	}

	/**
	 * Return the name of the first key column
	 */
	public String getFirstKeyColumnName() {
		return "configId";
	}
	
	/**
	 * Return the Id (pk) of the entity, must be Integer
	 */
	public Integer getId() {
		return configId;
	}

}